<?php


namespace App\Models;


use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class CarBrand extends Model
{
    use SoftDeletes, Common;

    protected $table = 'car_brand';


    protected static function boot()
    {

        static::creating(function ($model){
            $model->attributes['pinyin_first'] = getFirstCharter($model->attributes['name']);
        });

        parent::boot();
    }

}
